summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/Network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSSupport/Network.cpp')
-rw-r--r--src/OSSupport/Network.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/OSSupport/Network.cpp b/src/OSSupport/Network.cpp
index 4dc8d1df1..c26a8e17d 100644
--- a/src/OSSupport/Network.cpp
+++ b/src/OSSupport/Network.cpp
@@ -1076,7 +1076,13 @@ cNetworkSingleton::cNetworkSingleton(void)
#ifdef _WIN32
WSADATA wsaData;
memset(&wsaData, 0, sizeof(wsaData));
- WSAStartup (MAKEWORD(2, 2), &wsaData);
+ int res = WSAStartup (MAKEWORD(2, 2), &wsaData);
+ if (res != 0)
+ {
+ int err = WSAGetLastError();
+ LOGWARNING("WSAStartup failed: %d, WSAGLE = %d (%s)", res, err, evutil_socket_error_to_string(err));
+ exit(1);
+ }
#endif // _WIN32
// Initialize LibEvent logging: